{include file="public/header"}
<div class="index_html flex_sign">

{include file="public/nav"}
    <div class="banner_box">

        <img src="__STATIC__/index/imgs/index_banner.jpg" alt="">
        <div class="search_box">
            <form action="" method="get">
            <div class="middle">
                <input type="text" name="name" placeholder="请输入您想搜索的姓名、身份证号">

                <input type="submit" value="搜索"  class="search_btn"><i></i><span>搜索</span></button>
            </div>
                </form>
            <div class="new_box">
                <a href="{:url('patient/add_patient')}">
                    <i><img src="__STATIC__/index/imgs/new_btn.png" alt=""></i>
                    <span>新建患者</span>
                </a>
            </div>
        </div>
    </div>

    {if condition="!$list->isEmpty()"}
    <div class="list_box" style="">
        <div class="title">
            <p>搜索列表</p>
        </div>
        <div class="list">
            <div class="top_dec">
                <strong>姓名</strong>
                <strong>性别</strong>
                <strong>身份证号</strong>
                <strong>检查记录</strong>
            </div>
            <ul>

                {foreach $list as $patient}
                <li>
                    <a href="{:url('record/add_record',array('id'=>$patient['id']))}" class="left_a">
                        <img src="__STATIC__/index/imgs/add_btn.png" alt="">
                    </a>


                    <a href="{:url('patient/patient_info',array('pid'=>$patient['id']))}" class="right_a">
							<span class="first">
								<em>{$patient['name']}</em>
							</span>
                        <span>{$patient['sex']|get_sex_str}</span>
                        <span>{$patient['document_num']}</span>
                        <span>共{$patient['record_count']}条检查记录</span>
                    </a>
                </li>

                {/foreach}


            </ul>
        </div>
    </div>
    {else/}
        <div class="list_box" style="">
            <div class="title">
                <p>搜索列表</p>
                <div class="no_people">
                    <span>暂无患者记录</span>
                </div>
            </div>
        </div>
    {/if}

</div>
{include file="public/footer"}
